home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 476-500 / disk_494 / inputlock / inputlock.asm < prev    next >
Assembly Source File  |  1992-05-06  |  14KB  |  572 lines

  1. *    InputLock
  2. *    By Preben Nielsen
  3. *
  4. *      This program is intended as a help to Amiga-users who has cats
  5. *    or other pets (or children) that messes with the Amiga as soon
  6. *    as you leave it for a second.
  7. *
  8. *      It installes an input-handler which lets you lock the keyboard
  9. *       and mouse by pressing a few buttons (currently LALT-CTRL-'l').
  10. *
  11. *      Once installed, the program only uses 190 bytes of memory. To
  12. *    remove the handler simply run the program again.
  13. *
  14. *    NOTE:    There's no need to 'RUN' or 'RUNBACK' this program from the
  15. *        CLI. It terminates immediately.
  16. *
  17. *HISTORY
  18. *          Made with Hisoft V2.12
  19. *
  20. *  V1.0   11-Apr-91: First attempt. Works of course.
  21. *  V1.1   19-May-91: Help, I just found out that my "TellInputDevice"
  22. *                    routine trashes memory-address 0 because it didn't
  23. *                    do a "NewList" on its Message-port. It didn't cause
  24. *                    any problems most of the time, but it has now been
  25. *                    cured.
  26.                    
  27.     OPT O+
  28.     OPT O1+            ; Tells when a branch could be optimised to short
  29.     OPT i+            ; Tells when '#' is probably missing
  30.  
  31.         incdir        "AsmInc:"
  32.         include        "exec/exec_lib.i"
  33.         include        "exec/io.i"
  34.         include        "exec/memory.i"
  35.         include        "exec/interrupts.i"
  36.         include        "devices/input.i"
  37.         include        "devices/inputevent.i"
  38.         include        "libraries/dosextens.i"
  39.         include        "libraries/dos_lib.i"
  40.  
  41. Prepare        MACRO
  42.         IFC        '\1','Exec_Call'
  43.         movea.l        4.W,A6
  44.         ENDC
  45.         IFC        '\1','Intuition_Call'
  46.         movea.l        IntBase(DB),A6
  47.         ENDC
  48.         IFC        '\1','Gfx_Call'
  49.         movea.l        GfxBase(DB),A6
  50.         ENDC
  51.         IFC        '\1','Dos_Call'
  52.         movea.l        DosBase(DB),A6
  53.         ENDC
  54.         ENDM
  55. CallLib        MACRO
  56.         jsr        _LVO\1(A6)
  57.         ENDM
  58. Call        MACRO
  59.         bsr        \1
  60.         ENDM
  61. CallS        MACRO
  62.         bsr.S        \1
  63.         ENDM
  64. Push        MACRO
  65.         movem.l        \1,-(SP)
  66.         ENDM
  67. Pop        MACRO
  68.         movem.l        (SP)+,\1
  69.         ENDM
  70. rAPtr        MACRO        name
  71. DefSiz        set        DefSiz+4
  72. DefPtr        set        DefPtr-4
  73. \1        =        DefPtr
  74.         ENDM
  75. rLong        MACRO        name
  76. DefSiz        set        DefSiz+4
  77. DefPtr        set        DefPtr-4
  78. \1        =        DefPtr
  79.         ENDM
  80. rWord        MACRO        name
  81. DefSiz        set        DefSiz+2
  82. DefPtr        set        DefPtr-2
  83. \1        =        DefPtr
  84.         ENDM
  85. rByte        MACRO        name
  86. DefSiz        set        DefSiz+1
  87. DefPtr        set        DefPtr-1
  88. \1        =        DefPtr
  89.         ENDM
  90. rStorage    MACRO        name,size    ; Define storage
  91. DefSiz        set        DefSiz+\2
  92. DefPtr        set        DefPtr-\2
  93. \1        =        DefPtr
  94.         ENDM
  95. rEVEN        MACRO                ; Word boundary
  96.         IFNE        DefPtr&1
  97. DefPtr        set        DefPtr-1
  98. DefSiz        set        DefSiz+1
  99.         ENDC
  100.         ENDM
  101. rStart        MACRO                ; Define var section
  102. DefPtr        set        0
  103. DefSiz        set        0
  104.         ENDM
  105. rEnd        MACRO                ; End var section
  106. RelSize        =        DefSiz
  107.         ENDM
  108. rAlloc        MACRO                ; Allocate vars
  109.         link        DB,#-RelSize
  110.         ENDM
  111. rFree        MACRO                ; Deallocate vars
  112.         unlk        DB
  113.         ENDM
  114. rClear        MACRO                ; Reset all vars
  115.         movem.l        D0/DB,-(SP)
  116.         move.w        #RelSize-1,D0
  117. rClr.\@        clr.b        -(DB)
  118.         dbf        D0,rClr.\@
  119.         movem.l        (SP)+,D0/DB
  120.         ENDM
  121.  
  122. DB        EQUR        A4
  123.  
  124.         SECTION        InputLock,CODE
  125. InitProcess    rAlloc                    ; Allocate memory for variables
  126.         rClear                    ; Clear the memory
  127.         Prepare        Exec_Call
  128.         suba.l        A1,A1
  129.         CallLib        FindTask        ; Find us
  130.         move.l        D0,PProcess(DB)
  131.         movea.l        D0,A2
  132.         tst.l        pr_CLI(A2)
  133.         bne.S        GetLibs
  134. WBStart        lea        pr_MsgPort(A2),A0
  135.         CallLib        WaitPort        ; wait for a message
  136.         lea        pr_MsgPort(A2),A0
  137.         CallLib        GetMsg            ; then get it
  138.         move.l        D0,WBMsg(DB)        ; save it for later reply
  139. GetLibs        lea        DosName(PC),A1
  140.         CallLib        OldOpenLibrary
  141.         move.l        D0,DosBase(DB)
  142.         beq.S        Error
  143.  
  144.         CallLib        Forbid
  145.         lea        IHS(PC),A1
  146.         lea        ihs_PortName(A1),A1
  147.         CallLib        FindPort
  148.         move.l        D0,D2
  149.         CallLib        Permit
  150.         move.l        D2,D0            ; Does Forbid/Permit destroy scratch-registers ?
  151.         beq.S        DoInstall
  152. DoRemove    moveq        #REMOVED,D7
  153.         lea        IHS(PC),A0
  154.         lea        PSEndIHS1(PC),A1
  155.         lea        PSEndIHS2(PC),A2
  156.         Call        RemoveHandler
  157.         beq.S        ShowMsg
  158.         moveq        #CANTREMOVE,D7
  159.         bra.S        ShowMsg
  160. DoInstall    moveq        #INSTALLED,D7
  161.         lea        IHS(PC),A0
  162.         lea        PSPrepIHS1(PC),A1
  163.         lea        PSPrepIHS2(PC),A2
  164.         Call        InstallHandler
  165.         beq.S        ShowMsg
  166.         moveq        #CANTINSTALL,D7
  167. ShowMsg        move.l        D7,D0
  168.         Call        CONMsg
  169.  
  170. Error
  171. Exit        Prepare        Exec_Call
  172. FreeDos        move.l        DosBase(DB),D0
  173.         beq.S        ReplyWB
  174.         move.l        D0,A1
  175.         CallLib        CloseLibrary
  176. ReplyWB        move.l        WBMsg(DB),D2
  177.         beq.S        AllDone
  178.         CallLib        Forbid            ; We were started from WB
  179.         movea.l        D2,A1
  180.         CallLib        ReplyMsg        ; Reply WBMessage
  181. AllDone        rFree
  182.         moveq        #0,D0
  183.         rts
  184.  
  185. FHandle        EQUR        D5
  186. * Call: D0 = Msg-number
  187. CONMsg        Push        D0-D7/A0-A6
  188.         Prepare        Dos_Call
  189.         move.l        D0,D4
  190.         moveq        #0,D6
  191.         CallLib        Output
  192.         move.l        D0,FHandle
  193.         bne.S        1$
  194.         moveq        #1,D6
  195.         lea        CONName(PC),A0
  196.         move.l        A0,D1
  197.         move.l        #MODE_OLDFILE,D2
  198.         CallLib        Open
  199.         move.l        D0,FHandle
  200.         beq.S        2$
  201. 1$        moveq        #INFOMSG,D0
  202.         Call        SendMsg
  203.         move.l        D4,D0
  204.         Call        SendMsg
  205.         tst.l        D6
  206.         beq.S        2$
  207.         moveq        #127,D1
  208.         CallLib        Delay
  209.         move.l        FHandle,D1
  210.         CallLib        Close
  211. 2$        Pop        D0-D7/A0-A6
  212.         rts
  213.  
  214. * Call: D0 = Msg-number
  215. SendMsg        neg.l        D0
  216.         lsl.l        #1,D0
  217.         lea        MsgTable(PC),A0
  218.         add.w        0(A0,D0),A0
  219.         move.l        A0,D2
  220.         moveq        #-1,D3
  221. 1$        addq.l        #1,D3
  222.         tst.b        (A0)+
  223.         bne.S        1$
  224.         move.l        FHandle,D1
  225.         Prepare        Dos_Call
  226.         CallLib        Write
  227.         rts
  228.  
  229. INFOMSG        =0
  230. INSTALLED    =-1
  231. REMOVED        =-2
  232. CANTINSTALL    =-3
  233. CANTREMOVE    =-4
  234.  
  235. MsgText        MACRO
  236.         dc.w        \1-MsgTable
  237.         ENDM
  238. MsgTable    MsgText        Msg
  239.         MsgText        Msg1
  240.         MsgText        Msg2
  241.         MsgText        Msg3
  242.         MsgText        Msg4
  243.  
  244. CONName        dc.b        'CON:100/60/330/63/InputLock',0
  245. Msg        dc.b        10,$9B,'0;33m InputLock V1.1',10
  246.         dc.b        $9B,'0;31m 1991 by ',$9B,'0;33mPreben Nielsen',$9B,'0;31m',10,' ',0
  247. Msg1        dc.b        'has just been installed...',10,0
  248. Msg2        dc.b        'has just been removed...',10,0
  249. Msg3        dc.b        'Error: Cannot install handler',10,0
  250. Msg4        dc.b        'Error: Cannot remove handler',10,0
  251.         EVEN
  252.  
  253. rtsValue    EQUR        D7
  254. * This is general-purpose inputhandler removal-routine
  255. * It only needs an ihs with a port-name to remove the handler
  256. * Call:   A0 = ihs
  257. *      A1 = first ihs-installation-routine or NULL
  258. *      A2 = second ihs-installation-routine or NULL
  259. * Return: D0 = 0 means succes
  260. RemoveHandler    Push        D1/rtsValue/A0-A3/A6
  261.         moveq        #-1,rtsValue
  262.         move.l        A2,A3
  263.         move.l        A0,A2
  264.         move.l        A1,D1
  265.         beq.S        1$
  266.         jsr        (A1)        ; A0 = ihs
  267.         beq.S        2$
  268.         move.l        D0,A2
  269. 1$        move.l        A2,A0
  270.         Prepare        Exec_Call
  271.         moveq        #IND_REMHANDLER,D0
  272.         Call        TellInputDevice
  273.         move.l        D0,rtsValue
  274.         bne.S        2$
  275.         lea        ihs_Port(A2),A1
  276.         CallLib        RemPort
  277.         moveq        #0,D0
  278.         bra.S        3$
  279. 2$        moveq        #-1,D0
  280. 3$        move.l        A3,D1
  281.         beq.S        4$
  282.         move.l        A2,A0
  283.         jsr        (A3)        ; A0 = ihs, D0 = 0 means succes
  284. 4$        move.l        rtsValue,D0
  285.         Pop        D1/rtsValue/A0-A3/A6
  286.         rts
  287.  
  288. * This is general-purpose inputhandler installation-routine
  289. * It only needs an ihs with a port-name to install the handler
  290. * Call:   A0 = ihs
  291. *      A1 = first ihs-installation-routine or NULL
  292. *      A2 = second ihs-installation-routine or NULL
  293. * Return: D0 = 0 means succes
  294. InstallHandler    Push        D1/rtsValue/A0-A3/A6
  295.         moveq        #-1,rtsValue
  296.         move.l        A2,A3
  297.         move.l        A0,A2
  298.         move.l        A1,D1
  299.         beq.S        1$
  300.         jsr        (A1)        ; A0 = ihs
  301.         beq.S        2$
  302.         move.l        D0,A2
  303. 1$        move.l        A2,A0
  304.         moveq        #IND_ADDHANDLER,D0
  305.         Call        TellInputDevice
  306.         move.l        D0,rtsValue
  307.         bne.S        2$
  308.         lea        ihs_Port(A2),A1
  309.         lea        ihs_PortName(A2),A0
  310.         move.l        A0,MP+LN_NAME(A1)        ;MsgPort->mp_Node.ln_Name=Name;
  311.         clr.b        MP+LN_PRI(A1)            ;MsgPort->mp_Node.ln_Pri =0;
  312.         move.b        #NT_MSGPORT,MP+LN_TYPE(A1)    ;MsgPort->mp_Node.ln_Type=NT_MSGPORT;
  313.         move.b        #PA_IGNORE,MP_FLAGS(A1)        ;MsgPort->mp_Flags     =PA_IGNORE;
  314.         Prepare        Exec_Call
  315.         CallLib        AddPort
  316.         moveq        #0,D0
  317.         bra.S        3$
  318. 2$        moveq        #-1,D0
  319. 3$        move.l        A3,D1
  320.         beq.S        4$
  321.         move.l        A2,A0
  322.         jsr        (A3)        ; A0 = ihs, D0 = 0 means succes
  323. 4$        move.l        rtsValue,D0
  324.         Pop        D1/rtsValue/A0-A3/A6
  325.         rts
  326.  
  327. * Open the input device. Set up the I/O block to add or remove the
  328. * input handler, and send the request to the input device. Finally,
  329. * close the device
  330. * Call:   A0 = ihs
  331. *      D0 = Function to perform (IND_ADDHANDLER/IND_REMHANDLER)
  332. * Return: D0 = 0 means succes
  333. TellInputDevice    Push        D1-D2/rtsValue/A0-A3/A6
  334.         Prepare        Exec_Call
  335.         moveq        #-1,rtsValue
  336.         move.l        D0,D2
  337.         move.l        A0,A2
  338.         lea        IReq(DB),A0
  339.         moveq        #IOSTD_SIZE,D0
  340.         Call        MemClear
  341.         lea        IPort(DB),A0
  342.         moveq        #MP_SIZE,D0
  343.         Call        MemClear
  344.         move.l        A0,A3
  345.         move.b        #NT_MSGPORT,MP+LN_TYPE(A3)    ; mp_Node.ln_Type=NT_MSGPORT;
  346.         move.b        #PA_SIGNAL,MP_FLAGS(A3)        ; mp_Flags    =PA_SIGNAL;
  347.         moveq        #-1,D0
  348.         CallLib        AllocSignal
  349.         move.b        D0,MP_SIGBIT(A3)        ; mp_SigBit    =MPSigBit;
  350.         bmi.S        2$
  351.         suba.l        A1,A1
  352.         CallLib        FindTask
  353.         move.l        D0,MP_SIGTASK(A3)        ; mp_SigTask     =FindTask(0);
  354.         lea        MP_MSGLIST(A3),A0
  355.         NEWLIST        A0
  356.         lea        IReq(DB),A1
  357.         move.l        A3,IO+MN_REPLYPORT(A1)        ; ExtReq->io_Message.mn_ReplyPort   =taskReplyPort;
  358.         move.b        #NT_MESSAGE,IO+MN+LN_TYPE(A1)    ; ExtReq->io_Message.mn_Node.ln_Type=NT_MESSAGE;
  359.         lea        InputName(PC),A0        ; input.device
  360.         moveq        #0,D0                ; unit#
  361.         moveq        #0,D1                ; flags
  362.         CallLib        OpenDevice
  363.         tst.w        D0                ; flag: error if > 0
  364.         bne.S        1$
  365.         lea        IReq(DB),A1
  366.         move.w        D2,IO_COMMAND(A1)
  367.         lea        ihs_Interrupt(A2),A0
  368.         move.l        A0,IO_DATA(A1)
  369.         CallLib        DoIO
  370.         move.l        D0,rtsValue
  371.         lea        IReq(DB),A1
  372.         CallLib        CloseDevice
  373. 1$        move.b        MP_SIGBIT(A3),D0
  374.         CallLib        FreeSignal
  375. 2$        move.l        rtsValue,D0
  376.         Pop        D1-D2/rtsValue/A0-A3/A6
  377.         rts
  378.  
  379. * Call: A0    = Memory area
  380. *    D0:16 = Count
  381. MemClear    Push        D0-D1/A0
  382.         moveq        #0,D1
  383.         bra.S        2$
  384. 1$        move.b        D1,(A0)+
  385. 2$        dbf        D0,1$
  386.         Pop        D0-D1/A0
  387.         rts
  388.  
  389. * Call: A0   = Source
  390. *    A1   = Destination
  391. *    D0:16= Count
  392. MemCopy        Push        D0/A0-A1
  393.         bra.S        2$
  394. 1$        move.b        (A0)+,(A1)+
  395. 2$        dbf        D0,1$
  396.         Pop        D0/A0-A1
  397.         rts
  398.  
  399. * Each handler should have such a pair of installation-routine
  400. * The first one is passed to InstallHandler in A1 and it
  401. * is called immediately when entering InstallHandler
  402. * The second one is passed to InstallHandler in A2 and it
  403. * is called after attempt to install handler and message-port
  404. * -----------------------------------------------------------------
  405. * Call:   A0 = ihs
  406. * Return: D0 has to point to ihs to be used when installation proceeds
  407. *      If D0 = 0 then installation is aborted
  408. PSPrepIHS1    Push        D1/A0-A1/A6
  409.         Prepare        Exec_Call
  410.         move.l        #HandlerSize,D0
  411.         move.l        #MEMF_PUBLIC|MEMF_CLEAR,D1
  412.         CallLib        AllocMem
  413.         move.l        D0,HMem(DB)
  414.         beq.S        2$
  415.         move.l        D0,A1
  416.         lea        IHS(PC),A0
  417.         move.l        #HandlerSize,D0
  418.         Call        MemCopy
  419.         move.l        D0,ihs_Length(A1)        ; This will enable removal by other programs
  420.         lea        HandlerCode-IHS(A1),A0
  421.         move.l        A0,ihs_Interrupt+IS_CODE(A1)    ; HandlerBlock.HInterrupt.is_Code = Handler
  422.         clr.l        ihs_Interrupt+IS_DATA(A1)    ; HandlerBlock.HInterrupt.is_Data = 0
  423.         move.b        #HPRI,ihs_Interrupt+LN_PRI(A1)    ; HandlerBlock.HInterrupt.is_Node.ln_Pri = PRI
  424.         move.l        A1,D0
  425. 2$        Pop        D1/A0-A1/A6
  426.         rts
  427.  
  428. * Call:   A0 = ihs
  429. *         D0 = 0 means everything went perfect
  430. *             -1 means something went wrong during installation
  431. PSPrepIHS2    Push        D0-D1/A0-A1/A6
  432.         tst.l        D0
  433.         beq.S        1$
  434.         move.l        HMem(DB),D0
  435.         beq.S        1$
  436.         move.l        D0,A1
  437.         move.l        #HandlerSize,D0
  438.         Prepare        Exec_Call
  439.         CallLib        FreeMem
  440. 1$        Pop        D0-D1/A0-A1/A6
  441.         rts
  442.  
  443. * Each handler should have such a pair of ending-routine
  444. * The first one is passed to RemoveHandler in A1 and it
  445. * is called immediately when entering RemoveHandler
  446. * The second one is passed to RemoveHandler in A2 and it
  447. * is called after attempt to remove handler and message-port
  448. * -----------------------------------------------------------------
  449. * Call:   A0 = ihs
  450. * Return: D0 has to point to ihs to be used when removal proceeds
  451. *      If D0 = 0 then removal is aborted
  452. PSEndIHS1    Push        D1-D2/A0-A1/A6
  453.         Prepare        Exec_Call
  454.         CallLib        Forbid
  455.         lea        ihs_PortName(A0),A1
  456.         CallLib        FindPort
  457.         move.l        D0,D2
  458.         CallLib        Permit
  459.         move.l        D2,D0            ; Does Forbid/Permit destroy scratch-registers ?
  460.         Pop        D1-D2/A0-A1/A6
  461.         rts
  462. * Call:   A0 = ihs
  463. *         D0 = 0 means everything went perfect
  464. *             -1 means something went wrong during removal
  465. PSEndIHS2    Push        D0-D1/A0-A1/A6
  466.         tst.l        D0
  467.         bmi.S        1$
  468.         Prepare        Exec_Call
  469.         move.l        ihs_Length(A0),D0
  470.         move.l        A0,A1
  471.         CallLib        FreeMem
  472. 1$        Pop        D0-D1/A0-A1/A6
  473.         rts
  474.  
  475.  
  476. *====================== Input-handler start =========================
  477. ihs_Port    =0
  478. ihs_Interrupt    =MP_SIZE
  479. ihs_ID        =MP_SIZE+IS_SIZE
  480. ihs_Length    =MP_SIZE+IS_SIZE+4
  481. ihs_Flags    =MP_SIZE+IS_SIZE+8
  482. ihs_PortName    =MP_SIZE+IS_SIZE+10
  483.  
  484. ihs_Start    MACRO
  485.         dcb.b        MP_SIZE        ; Message-Port structure
  486.         dcb.b        IS_SIZE        ; Interrupt structure
  487.         dc.l        'P_IH'        ; ID (Handler made by me)
  488.         dc.l        0        ; Length of handler 
  489.         dc.w        0        ; Flags
  490.         dc.b        \1,0
  491.         EVEN
  492.         ENDM
  493.  
  494. HPRI        =127                ; Handler-priority
  495. HDisabled    =0
  496. HNoExtRemoval    =1                ; Future
  497.  
  498. * This is the handler-block
  499. IHS        ihs_Start    <'InputLock V1.1 Port'>
  500. * Local variables
  501. Chain        dc.l        0
  502. Status        dc.w        0
  503. INPUTDISABLED    =0
  504. * For each event in the event list:
  505. *  If we were waiting for this event then process it.
  506. * When all the events have been checked, return the event list so that
  507. * others can do their things.
  508. PEvent        EQUR    A2                ; Previous Event
  509. Event        EQUR    A1                ; This Event
  510. Bits        EQUR    A0
  511.  
  512. Next        =ie_NextEvent
  513. Class        =ie_Class
  514. Code        =ie_Code
  515. Qual        =ie_Qualifier
  516. * These are the qualifier-keys the input-handler waits for
  517. QUALIFIERS    =IEQUALIFIER_LALT|IEQUALIFIER_CONTROL
  518. * These are the keys the input-handler acts on
  519. Toggle_Key    =$28                    ; 'l'
  520. * Call:  A0 = List of InputEvents, A1 = HandlerData
  521. HandlerCode    Push        Bits/Event/PEvent
  522.         move.w        IHS+ihs_Flags(PC),D0
  523.         btst        #HDisabled,D0        ; Future feature
  524.         bne.S        NoMoreEvents
  525.         lea        Chain(PC),PEvent
  526.         move.l        A0,Next(PEvent)
  527.         lea        Status(PC),Bits
  528. ieLoop        move.l        Next(PEvent),Event
  529.         move.l        Event,D0
  530.         beq.S        NoMoreEvents
  531.         cmpi.b        #IECLASS_RAWMOUSE,Class(Event)
  532.         beq.S        CheckLock
  533.         cmpi.b        #IECLASS_RAWKEY,Class(Event)
  534.         bne.S        DontRemove
  535.         move.w        Qual(Event),D0
  536.         andi.w        #QUALIFIERS|IEQUALIFIER_REPEAT,D0
  537.         cmpi.w        #QUALIFIERS,D0
  538.         bne.S        CheckLock
  539.         cmp.w        #Toggle_Key,Code(Event)
  540.         bne.S        CheckLock
  541.         bchg        #INPUTDISABLED,(Bits)
  542.         bra.S        Remove
  543. CheckLock    btst        #INPUTDISABLED,(Bits)
  544.         bne.S        Remove
  545. * Just move on to next Event
  546. DontRemove    move.l        Event,PEvent
  547.         bra.S        ieLoop
  548. * Remove event from chain and move on to next Event
  549. Remove        move.l        Next(Event),Next(PEvent)
  550.         bra.S        ieLoop
  551. * Lets return
  552. NoMoreEvents    Pop        Bits/Event/PEvent
  553.         move.l        Chain(PC),D0        ; Return (shortened ?) chain
  554.         rts
  555. HandlerSize    =        *-IHS
  556. *====================== Input-handler end ===========================
  557.  
  558. *====================== Data-definition start =======================
  559.  rStart
  560.  rAPtr        PProcess
  561.  rAPtr        WBMsg
  562.  rAPtr        DosBase
  563.  rStorage    IReq,IOSTD_SIZE
  564.  rStorage    IPort,MP_SIZE
  565.  rAPtr        HMem
  566.  rEnd
  567.  
  568. DosName        dc.b        'dos.library',0
  569. InputName    dc.b        'input.device',0
  570.         END
  571.  
  572.